<?php

Yii::import('common.models._base.BaseTargetAudience');

class TargetAudience extends BaseTargetAudience {

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

    public static function label($n = 1) {
        return Yii::t('app', 'Target Audience|Target Audiences', $n);
    }

    public function rules() {
        return array(
            array('target_audience_name,status', 'required'),
            array('status', 'numerical', 'integerOnly' => true),
            array('target_audience_name', 'length', 'max' => 45),
            array('create_time', 'safe'),
            array('create_time, status', 'default', 'setOnEmpty' => true, 'value' => null),
            array('id, target_audience_name, create_time, status', 'safe', 'on' => 'search'),
        );
    }

    public function attributeLabels() {
        return array(
            'id' => Yii::t('app', 'ID'),
            'target_audience_name' => Yii::t('app', 'Audience Name'),
            'create_time' => Yii::t('app', 'Create Time'),
            'status' => Yii::t('app', 'Status'),
            'classesTargetAudiences' => null,
        );
    }

}